package com.shopping.dao;

import com.shopping.bean.Collect;
import com.shopping.bean.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CommentDao {
    // 添加 start 参数
    List<Comment> listByProductId(@Param("productid") int productid, @Param("start") int start, @Param("limit") int limit, @Param("type") Integer type);

    int countByProductId(@Param("productid") int productid, @Param("type") Integer type);

    int add(Comment comment);

    List<Comment> listByUserId(int userid);

    int deleteComment(Integer commentid);
}